using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using GarageGames.Torque.T2D;
using GarageGames.Torque.Core;
using GarageGames.Torque.Materials;
using Xyne.Templates;
using GarageGames.Torque.GUI;
using Microsoft.Xna.Framework.Graphics;
using Xyne.Objects;
using Xyne.Templates.PuzzlePieceTemplate;
using Xyne.Utilities;
using Xyne.Objects.Common;

namespace Xyne.Regions
{
    public abstract class HandRegion
    {
        // Bounds for the region
        private Rectangle bounds;
        // Reference to the PuzzleRegion
        private PuzzleRegion puzzle;
        private QueueRegion queue;

        public Rectangle Bounds
        {
            get { return bounds; }
            set { bounds = value; }
        }

        public PuzzleRegion PuzzleRegion
        {
            get { return puzzle; }
            set { puzzle = value; }
        }

        public QueueRegion QueueRegion
        {
            get
            {
                return queue;
            }

            set
            {
                queue = value;
            }
        }

        public HandRegion(Rectangle bounds, PuzzleRegion puzzle)
        {
            this.bounds = bounds;
            this.puzzle = puzzle;
        }

        /// <summary>
        /// Init
        /// </summary>
        public virtual void Init(QueueRegion inQueue)
        {
            this.queue = inQueue;
        }

        public abstract void Start();

        /// <summary>
        /// Card is being pressed
        /// </summary>
        /// <param name="cardIndex"></param>
        /// <param name="change"></param>
        public abstract bool CardPressed(int cardIndex);

        /// <summary>
        /// Card is let go
        /// </summary>
        /// <param name="cardIndex"></param>
        /// <param name="change"></param>
        public abstract void CardDepressed(int cardIndex);

        public abstract void RefreshCards();

    }
}
